In the last the years, much effort has been made to develop an electronic device which processes an audio signal having been converted into digital data such as a one-bit data string. Such a device is advantageous in various ways for data communications between plural devices, in comparison with devices processing audio signals which are analog data. Accompanied with the development of the aforesaid device, a digital audio signal technology suitable for data communications between plural devices has been actively researched. In addition, in consideration of the downsizing of devices such as mobile phone terminals, the reduction in the number of components and the downsizing have become technical problems in the field of communications devices.
In the field of data communications between plural electronic devices, infrared communications have attracted attention.
Infrared communications are communication means used in a variety of types of electronic devices such as mobile phone terminals and wireless earphones. Among various types, IrDA communication devices are infrared communication devices compliant with IrDA (Infra-red Data Association) which is a worldwide standard in infrared communications, and popularly adopted as inter-user information exchange means by many mobile phone terminals. In recent years, FIR (Fast Infra Red)-compliant IrDA communication devices with the maximum transmission rates of 4 Mbps have rapidly been diffused.
Such an IrDA communication device adopts, for transmission of audio data, i.e. for modulation of a transmitted optical signal, a method in which audio data is transmitted by a one-bit data string having been modulated by PDM (Pulse Density Modulation) or a method in which data transmission is performed by a two-bit data string having been modulated by four-valued PPM (Pulse Position Modulation).
The aforesaid method adopting PDM is disclosed by Japanese Unexamined Patent Publication No. 2004-135321 (published on Apr. 30, 2004; hereinafter Patent Document 1).
The method adopting the four-valued PDM is mainly used in FIR-compliant IrDA communication devices. In this method, an optical signal to be transmitted is modulated into a data string in which a pulse position is specified in units of two bits. A data string in which a pulse position is specified by two bits is made up of four types of pulses “00”, “01”, “10”, and “11” which have the same known pulse width but have different pulse positions (see FIG. 32). As shown in FIG. 32, if a data string made up of the aforesaid four types of pulses is arranged such that a pulse of “00” is transmitted after a pulse of “11”, a pulse whose pulse width is twice as long as the known pulse width is generated because the pulse of “11” is Joined with the pulse of “00”. In the FIR standard, a pulse whose pulse width is twice as long as the known pulse width (i.e. a pulse after the aforesaid joining) is termed double pulse, whereas a pulse with the known pulse width (i.e. a pulse without the joining) is termed single pulse.
Infrared communication devices such as IrDA communication devices are inherently accompanied with a variation in pulse width at the time of transmission of a pulse train (data string). In this patent application, “variation in pulse width” indicates a case where a pulse train that a receiving communication device receives is different on the time axis from a pulse train that a sending communication device sends. Examples of such a variation in pulse width includes: pulse widening (the pulse width of a particular pulse is widened), pulse shortening (the pulse width of a particular pulse is shortened on account of loss of a part of the pulse), pulse division (a single pulse is broken up into plural pulses due to loss of a part of the pulse), and generation of false pulse (a pulse which should not have existed). Such a variation in pulse width occurs in both the method adopting PDM and the method adopting four-valued PPM, and the frequency of the occurrence of a variation increases as the distance of data communications increases. In addition to this, a variation in pulse width may occur on account of an influence of disturbance light or the like.
For example, in case where a variation in pulse width occurs in audio data to be received by a receiving infrared communication device, the DC (Direct Current) level of the audio data is unnecessarily varied and hence noise is superposed into the audio data, with the result that the quality of reproduced sound is deteriorated.
In consideration of this, a receiving infrared communication device, i.e. a receiver (optical receiver) preferably has a muting function by which the reproduction of received audio data is stopped if a variation in pulse width occurs in the audio data.
To implement this muting function, Japanese Unexamined Patent Publication No. 2006-304076 (published on Nov. 2, 2006; hereinafter Patent Document 2) discloses a muting judgment circuit which stops the reproduction of audio data constituted by a pulse train with known pulse width, pulse cycle, and average pulse duty, when the reception condition becomes bad.
The muting judgment circuit disclosed by Patent Document 2 includes a smoothing circuit and a judgment circuit. The smoothing circuit converts the time density of a pulse into a voltage. The judgment circuit gives a decision on an output voltage from the smoothing circuit with reference to a predetermined threshold corresponding to a known average transmission rate. If the voltage is below the predetermined threshold, it is judged that the receipt condition of a digital signal is bad, and a signal for stopping the reproduction of the digital signal is output. In this way, the reproduction of a digital signal whose receipt condition is bad is stopped.
However, the technology disclosed by Patent Document 2 is unable to detect a defect in a pulse, which is a result of conversion of the time density of a pulse into a voltage by a smoothing circuit and is small but is large enough to allow the voltage to be not lower than a predetermined threshold. Furthermore, in the technology disclosed by Patent Document 2, it is not possible to detect a variation (e.g. pulse widening) of pulse width in the width direction of the pulse, with which a voltage value after the conversion by the smoothing circuit does not decrease.
Japanese Unexamined Patent Publication No. 2007-27833 (published on Feb. 1, 2007; hereinafter Patent Document 3) discloses a muting judgment circuit includes a logical OR circuit, a low-pass filter, and judging means. The logical OR circuit outputs a logical OR of digital signals of plural channels. The low-pass filter receives an output signal from the logical OR circuit and fetches a signal component whose pulse width, pulse cycle, and average pulse duty are known. The judging means makes, with a predetermined threshold, a judgment about the signal output from the low-pass filter. When the number of times the signal exceeds the predetermined threshold is below the transmission rate figured out by adding up the average transmission rates of the respective digital signals of plural channels, the judging means judges that the pulse width is decreased on account of deterioration of pulse waveform of a digital signal, and outputs a signal instructing to stop the reproduction of the digital signal. In this way, the reproduction of incoming signals of plural channels, whose pulse waveforms are deteriorated, is stopped.
However, with the technology disclosed in Patent Document 3, it is not possible to detect a defect in pulse, which is small but large enough to allow the number of times the output signal of the low-pass filter exceeds the predetermined threshold not to be below the transmission rate figured out by adding up the average transmission rates of the respective digital signals of plural channels. Also, being similar to the technology disclosed by Patent Document 2, the technology disclosed by Patent Document 3 cannot detect a variation in pulse width in the width direction of the pulse.
In the technologies disclosed by Patent Documents 2 and 3, the range of detectable noise is limited in case where noise occurs in an audio signal on account of a variation in pulse width. Therefore it is often impossible to stop the reproduction of the audio signal even if the noise occurs. As a result, such an audio signal with noise is reproduced and hence the result of the reproduction sounds unpleasant.
Assume that the aforesaid four-valued PPM is used for FIR-compliant infrared communications and the aforesaid variation of pulse width occurs in a data string in which a pulse position is specified by two bits. In such a case, an electronic device in which an infrared communication device is used as a receiver may confuse a single pulse with a double pulse. For example, when pulse widening occurs in a signal pulse, the electronic device may falsely recognize such a single pulse as a double pulse. On the other hand, when pulse shortening occurs in a double pulse, the electronic device may falsely recognize such a double pulse as a single pulse. With this kind of confusion of pulse, the electronic device cannot correctly receive data. Therefore the electronic device is required to discern a single pulse from a double pulse.
In electronic devices, the discernment of the type of pulses has conventionally been carried out mostly on the control system side. However, the scheme in which the discernment is carried out on the control system side is disadvantageous in that the discernment is not correctly done when the performance of the control system is not good. That is to say, as the distance of data communications increases, the control system more frequently misrecognizes a single pulse with pulse widening as a double pulse, and misrecognizes a double pulse with pulse shortening as a single pulse. As a result, the control system receives incorrect data. It is also pointed out that, to construct the aforesaid control system, the compatibility between the control system and the infrared communication device must be sufficiently contemplated. It is therefore not easily to construct a control system which is certainly compatible with an infrared communication device.
In this regard, Japanese Unexamined Patent Publication No. 2006-211510 (published on Aug. 10, 2006; hereinafter Patent Document 4) proposed a pulse data demodulator disclosed below, as a technology to realize data reception without confusion of single and double pulses.
In the demodulator disclosed by Patent Document 4, the pulse width of each of single and double pulses, which is specified by a packet format, is analyzed in every packet, and a threshold for discerning a single pulse from a double pulse is determined based on the result of the analysis. Furthermore, the demodulator of Patent Document 4 discerns a single pulse from a double pulse by comparing pulse data with the threshold. Therefore the demodulator of Patent Document 4 can receive pulse data without confusing a single pulse with a double pulse, even if the pulse data is accompanied by a variation in pulse width.
In the technology taught by Patent Document 4, the discernment of pulses is carried out with reference to a threshold determined based on single pulse and double pulse which are specified by a packet format. In particular, the demodulator of Patent Document 4 uses preamble as a single pulse for determining a threshold and uses start flag as a double pulse for determining a threshold.
However, in case where, on account of a rapid change in the reception characteristic of a receiver, a variation in pulse width occurs in a double pulse or single pulse specified by the packet format, the threshold thus determined is improper for the discernment of pulses in pulse data, and hence the discernment may not be properly carried out. In this way, the technology of Patent Document 4 is prone to misrecognition of a pulse. If the receiver sends an incorrect signal to the control system on account of the misrecognition, the control system cannot properly control the receiver, and reception errors occur in the entirety of the electronic device.
In the meanwhile, in the technology of Patent Document 4, the pulse width of a pulse train including a single pulse and a double pulse is adjusted by an adjusting circuit.
However, when the reception characteristic of the receiver rapidly changes after the adjustment of the pulse width by the adjusting circuit, a variation in the pulse width may occur in the pulse train after the adjustment. With such a variation in the pulse width, the receiver eventually sends an incorrect signal to the control system of the subsequent stage. As a result, the control system receiving the incorrect signal cannot properly control the receiver, and reception errors occur in the entirety of the electronic device.